<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/appmanager/a_Course.js此处编写
 -->
<template>
    <div>
        <view-grid :columns="columns"
                   :detail="detail"
                   :editFormFileds="editFormFileds"
                   :editFormOptions="editFormOptions"
                   :searchFormFileds="searchFormFileds"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/appmanager/a_Course.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'ParentId',
                    footer: "Foots",
                    cnName: '课程信息',
                    name: 'a_Course',
                    url: "/a_Course/",
                    sortName: "CreateTime"
                },
                extend: extend,
                editFormFileds: {"CourseName":"","Sort":"","Price":"","IsHot":"","ChildIds":"","GradeIds":"","Cateorys":"","IsDiscount":"","DiscountPrice":"","Status":"","IsLive":""},
                editFormOptions: [[{"title":"主课程名称","field":"CourseName","colSize":120,"type":"text"},
                               {"title":"课程排序","field":"Sort","colSize":120,"type":"number"},
                               {"title":"课程价格","field":"Price","colSize":120,"type":"decimal"},
                               {"dataKey":"top","title":"是否热门 0否1 是","field":"IsHot","colSize":120,"type":"switch"},
                               {"title":"免费试听子课程章节ID（10,11）","field":"ChildIds","colSize":120,"type":"text"},
                               {"title":"关联年级id集合","field":"GradeIds","type":"text"},
                               {"title":"分类标签Id集合","field":"Cateorys","type":"text"},
                               {"dataKey":"enable","title":"是否优惠0否 1是","field":"IsDiscount","colSize":120,"type":"switch"},
                               {"title":"课程优惠价格","field":"DiscountPrice","colSize":120,"type":"decimal"},
                               {"dataKey":"enable","title":"课程状态0正常1下架 2 等等","field":"Status","type":"switch"},
                               {"dataKey":"enable","title":"课程类型0否1直播","field":"IsLive","type":"switch"}]],
                searchFormFileds: {"CourseName":"","Price":"","IsHot":"","DiscountPrice":"","Iosproductid":"","Status":"","IsLive":""},
                searchFormOptions: [[{"title":"主课程名称","field":"CourseName","type":"text"},{"title":"课程价格","field":"Price","type":"decimal"},{"dataKey":"top","title":"是否热门 0否1 是","field":"IsHot","type":"switch"},{"title":"课程优惠价格","field":"DiscountPrice","type":"decimal"},{"title":"苹果支付价格设置","field":"Iosproductid","type":"decimal"},{"dataKey":"enable","title":"课程状态0正常1下架 2 等等","field":"Status","type":"switch"},{"dataKey":"enable","title":"课程类型0否1直播","field":"IsLive","type":"switch"}]],
                columns: [{field:'ParentId',title:'课程主信息编码',type:'int',width:120,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'CourseName',title:'主课程名称',type:'string',link:true,width:180,align:'left',sortable:true},
                       {field:'TeachersUserName',title:'授课老师',type:'string',width:120,align:'left'},
                       {field:'Sort',title:'课程排序',type:'int',width:120,align:'left'},
                       {field:'Price',title:'课程价格',type:'decimal',width:120,align:'left'},
                       {field:'IsHot',title:'是否热门 0否1 是',type:'int',bind:{ key:'top',data:[]},width:120,align:'left'},
                       {field:'ChildIds',title:'免费试听子课程章节ID（10,11）',type:'string',width:120,align:'left'},
                       {field:'ClassId',title:'班级分类ids',type:'int',width:120,align:'left'},
                       {field:'GradeIds',title:'关联年级id集合',type:'string',width:120,align:'left'},
                       {field:'Cateorys',title:'分类标签Id集合',type:'string',width:120,align:'left'},
                       {field:'IsDiscount',title:'是否优惠0否 1是',type:'int',bind:{ key:'enable',data:[]},width:120,align:'left'},
                       {field:'DiscountPrice',title:'课程优惠价格',type:'decimal',width:120,align:'left'},
                       {field:'Iosproductid',title:'苹果支付价格设置',type:'string',width:120,align:'left'},
                       {field:'IsTop',title:'是否推荐 0否 1 是',type:'int',width:120,align:'left'},
                       {field:'Sales',title:'销量',type:'int',width:120,align:'left'},
                       {field:'IosPayPirce',title:'苹果支付价格设置',type:'decimal',width:120,align:'left'},
                       {field:'Status',title:'课程状态0正常1下架 2 等等',type:'int',bind:{ key:'enable',data:[]},width:120,align:'left'},
                       {field:'ValidBeginTime',title:'有效开始时间',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'ValidEndTime',title:'有效结束时间',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'PreferentialBeginTime',title:'优惠开始日期',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'PreferentialEndTime',title:'优惠结束日期',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'TeachersUserId',title:'授课老师Id',type:'int',width:120,align:'left'},
                       {field:'InternalPrice',title:'内部员工价格',type:'decimal',width:120,align:'left'},
                       {field:'IosProductidName',title:'苹果价格',type:'string',width:120,align:'left'},
                       {field:'CoursePic',title:'图片',type:'string',width:120,align:'left'},
                       {field:'VirtualSales',title:'虚拟销量',type:'int',width:120,align:'left'},
                       {field:'CoursePicPhoneTran',title:'图片横图',type:'string',width:120,align:'left'},
                       {field:'IsExpress',title:'是否快递 ',type:'int',width:120,align:'left'},
                       {field:'ExpressPirce',title:'快递费',type:'decimal',width:120,align:'left'},
                       {field:'IsComic',title:'课程类型',type:'int',width:120,align:'left'},
                       {field:'IsRecord',title:'课程类型',type:'int',width:120,align:'left'},
                       {field:'IsDelete',title:'是否删除',type:'int',width:120,align:'left'},
                       {field:'TenantId',title:'多用户编码',type:'int',width:120,align:'left'},
                       {field:'CreateTime',title:'创建时间',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'LiveEndTime',title:'直播结束时间',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'LiveBeginTime',title:'直播开始时间',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'IsLongValid',title:'长期有效',type:'int',width:120,align:'left'},
                       {field:'Detailed',title:'课程详情',type:'string',width:120,align:'left'},
                       {field:'ChannelId',title:'直播频道ID',type:'string',width:120,align:'left'},
                       {field:'IsLive',title:'课程类型0否1直播',type:'int',bind:{ key:'enable',data:[]},width:120,align:'left'},
                       {field:'CoursePicMini',title:'图片缩略图',type:'string',width:120,align:'left'},
                       {field:'CoursePicPhone',title:'手机端图片竖图',type:'string',width:120,align:'left'},
                       {field:'CoursePicPhoneMini',title:'手机端图片缩略图',type:'string',width:120,align:'left'},
                       {field:'CoursePicContent',title:'图片',type:'string',width:120,align:'left'},
                       {field:'videoId',title:'录播或者点播的videoId',type:'string',width:120,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'UpdateTime',title:'修改时间',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'Modifier',title:'Modifier',type:'string',width:120,align:'left'}],
                detail: {
                    cnName:"子课程列表",
                    columns: [{field:'Id',title:'子课程编码',type:'int',width:120,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ChildName',title:'子课程名称',type:'string',width:120,edit:{type:'text'},align:'left',sortable:true},
                       {field:'ParentId',title:'父课程编码',type:'int',width:120,align:'left'},
                       {field:'ChildTeacher',title:'子课程老师',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'ChildSort',title:'子课程排序',type:'int',width:120,edit:{type:'number'},align:'left'},
                       {field:'ChildType',title:'子课程类型',type:'int',bind:{ key:'ordertype',data:[]},width:120,edit:{type:'select'},align:'left'},
                       {field:'ChildDes',title:'子课程描述',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'videoId',title:'视频标识',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'IsDelete',title:'是否删除',type:'int',bind:{ key:'enable',data:[]},width:120,edit:{type:'switch'},align:'left'},
                       {field:'IsTrialable',title:'是否是听',type:'int',bind:{ key:'enable',data:[]},width:120,edit:{type:'switch'},align:'left'},
                       {field:'ChannelId',title:'频道id',type:'string',width:120,align:'left'},
                       {field:'TenantId',title:'多用户编码',type:'int',width:120,align:'left'},
                       {field:'CreateTime',title:'创建时间',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'CreateId',title:'创建者编码',type:'int',width:120,hidden:true,align:'left'},
                       {field:'VideoCode2',title:'视频播放地址',type:'string',width:120,align:'left'},
                       {field:'VideoCode1',title:'视频播放地址',type:'string',width:120,align:'left'},
                       {field:'ChildRelevanceFile',title:'子课程关联文件',type:'string',width:120,align:'left'},
                       {field:'ChildTimeLength',title:'子课程长度 ',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'ChildStartTime',title:'子课程开始时间',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'ChildImgContent',title:'子课程Url',type:'string',width:120,align:'left'},
                       {field:'ChildUrl',title:'子课程Url',type:'string',width:120,align:'left'},
                       {field:'ChildEndTime',title:'子课程结束时间',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'UpdateTime',title:'修改时间',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'Modifier',title:'Modifier',type:'string',width:120,align:'left'}],
                    sortName: "Id",
                    key:"Id"
                }
            };
        }
    };
    export default vueParam;
</script>
